<script type="text/javascript">
$(function(){
	$.get("makeCardBlank/getUpdateInfo",getUpdateInfo,"json")
});
function formSubmit(form,callBack){
	var $form = $(form);
	if (!$form.valid()) {
		return false;
	}
	var count1=$("#count1").val();
	var url;
	if(count1!=""){//修改地址
		url="makeCardBlank/addTaskSingle";
	}else{
		url="applicationBlankCardTask/addTaskSingle";
	}
	//alert(url)
	$.ajax({
		type : $form.method || 'POST',
		url : url,
		data : $form.serializeArray(),
		dataType : "json",
		cache : false,
		success : dialogAjaxDone,
		error : DWZ.ajaxError
	});
	return false;
}

function queryTaskName(){
	var cardPCode=$("#cardPCode").val();
	var cardPhysicalType=$("#cardPhysicalType").val();
	if(cardPCode!=""&&cardPhysicalType!=""){
		$.post("queryBatchNo",{cardPCode:cardPCode,cardPhysicalType:cardPhysicalType},function(json){
			if(json.statusCode==DWZ.statusCode.error){
				navTabAjaxDone(json);
			}else{
				$("input[name='taskName']").val(json.serviceObject.str);
			}
		},"json");
	}else{
		alertMsg.info('卡产品，卡物理类型不能为空');
	}
	
}

function changeCardPhysicalType(){
	$("input[name='taskName']").val("")
}
</script>
<div class="pageContent">
	<form method="post" action="makeCardBlank/addTaskSingle" class="pageForm required-validate" onsubmit="return formSubmit(this);">
		<div class="pageFormContent" layoutH="56">
			
			<p>
				<label>卡产品：</label>
				<select onchange="changeCardPhysicalType()" id="cardPCode" name="cardPCode" class="validRequired">
				
				</select>
			</P>
		<!-- 	<p>
				<label>卡类型：</label>
				<select  name="cardTypeCode" class="validRequired">
					<option value="2">记名衍生卡</option>
					<option value="3">不记名衍生卡</option>
				</select>
			</P> -->
			<p>
				<label>卡物理类型：</label>
				<select onchange="changeCardPhysicalType()" id="cardPhysicalType" name="cardPhysicalType" class="validRequired">
				
				</select>
			</P>
			<p>
				<label>任务名称：</label>
				<input  name="taskName"  type="text" size="20" class="validRequired" readonly="readonly"/>
				<input id="idByQueryTaskName" type="button" onclick="queryTaskName()" value="任务名"/>
				<input  name="cardTaskNo"  type="hidden" size="20" />
			</p>
			<p>
				<label>制卡数量：</label>
				<input name="count" type="text" size="20" class="validRequired validCardQuantity" />
				<input id="count1" name="count1" type="hidden" />
			</P>
			<p>
				<label>制卡单位：</label>
				<select id="makeCardCorpNo" name="makeCardCorpNo" class="validRequired">
					
				</select>
			</P>
			<p>
				<label>备注(是否加急)：</label>
				<select id="isUrgent" name="isUrgent"  class="required">
					<option  value="N" >不加急</option>
					<option  value="Y" >加急</option>
				</select>
			</P>
		</div>
		<div class="formBar">
			<ul> 
				<li>
				<div class="buttonActive"><div class="buttonContent"><button type="submit" class="valid">提交</button></div></div>
				</li>
			</ul>
		</div>
	</form>
</div>